package com.woniu.form;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

@Data
@ApiModel("更改密码数据")
public class ChangePassWordForm {
    @Length(min = 1, max = 10, message = "密码长度在1-10位之间")
    @NotNull(message = "密码不能为空")
    @ApiModelProperty("旧密码")
    String oldPassword;

    @Length(min = 1, max = 10, message = "用户名长度在1-10位之间")
    @NotNull(message = "用户名不能为空")
    @ApiModelProperty("用户名")
    String userName;

    @Length(min = 1, max = 10, message = "密码长度在1-10位之间")
    @NotNull(message = "密码不能为空")
    @ApiModelProperty("新密码")
    String newPassWord;
}
